<template>
  <div class="content">

       <div class="title">
         取密码记录表
         <span>注：每次取密码记录一次</span>
       </div>

       <div class="wrap">

         <div class="head">
           <div class="left">
             <input placeholder="请输入搜索内容..." type="text">
             <div class="sousuo">
               <img src="../assets/img/sou.png" alt="">
               搜索
             </div>
           </div>


         </div>




			 <el-table
			     :data="tableData"
			     border
           stripe
			     style="width: 100%;margin-top:20px;">

			     <el-table-column
			           type="selection"
			           fixed
			           width="55">
			         </el-table-column>
			       <el-table-column
			             type="index"
			             fixed
			             width="50">
			        </el-table-column>
			     <el-table-column
			       prop="lockid"
			       label="锁ID"
			       width="180">
			     </el-table-column>
			     <el-table-column
			       prop="lockname"
			       label="锁名称"
			       width="180">
			     </el-table-column>
			     <el-table-column
			       prop="admin_user_id"
			       label="组织ID"
			       width="180">
			     </el-table-column>
			     <el-table-column
			       prop="weixin"
			       label="组织名称"
			       width="180">
			     </el-table-column>
			     <el-table-column
			       prop="admin_mobile"
			       label="管理员电话"
			       width="180">
			     </el-table-column>
           <el-table-column
             prop="order_sn"
             label="订单编号"
             width="180">
           </el-table-column>
           <el-table-column
             prop="real_name"
             label="取密码人员"
             width="180">
           </el-table-column>
           <el-table-column
             prop="add_time"
             label="取密码时间"
             width="180">
           </el-table-column>
			   </el-table>
         <div class="page">
           <el-pagination
             background
             @current-change='current'
             @prev-click='prev'
             @next-click='next'
             :page-size='page'
             layout="prev, pager, next"
             :total="count">
           </el-pagination>
         </div>
		 </div>




  </div>
</template>

<script>
  import {getpwd_order} from '../js/getApi.js'
  export default{
    name:'b_index',
    data(){
      return{
        tableData:[],
        count:0,
        page:8
      }
    },
    methods:{
      current(val){
         this.getlist(val,this.page);
      },
      prev(val){
          this.getlist(val,this.page);
      },
      next(val){
          this.getlist(val,this.page);
      },
    async  getlist(page,size){
        const data=await getpwd_order(this.$store.state.token,'',page,size);
        this.count=data.count;
        this.tableData=data.list;
      }
    },
    created() {
      this.getlist(1,this.page);
    }
  }
</script>

<style scoped>
 .page{
    text-align: center;
    margin: 30px auto;
   }

  .title{
      height: 84px;
      line-height: 84px;
      color: rgba(5, 5, 5, 100);
      font-size: 16px;
      text-align: left;
      font-family: SourceHanSansSC-regular;
      border-bottom: 1px solid #F7F7F7;
  }

    .title span{
      color: rgba(153, 153, 153, 100);
      font-size: 12px;
      margin-left: 10px;
      font-family: SourceHanSansSC-regular;
    }
  .head{
    margin-top:33px;
   display: flex;
  }
  .head div{
    display: inline-block;
  }

  .head input{
    width: 190px;
    height:30px;
    border-radius:10px 0 0 10px;
    padding-left:10px;
    border: 1px solid rgba(187, 187, 187, 100);
    float: left;
  }
  .sousuo{
    width: 88px;
    height:34px;
    line-height: 34px;
    background-color: rgba(26, 188, 156, 100);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 100);
    float: left;
    margin-left: -1px;
    margin-top: -1px;
    color: #fff;
    cursor: pointer;
  }
  .sousuo img{
    width: 19px;
    height: 19px;
    vertical-align:middle;
  }
  .add{
    width: 88px;
    height:34px;
    line-height: 34px;
    background-color: rgba(26, 188, 156, 100);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 100);
    color: #fff;
    margin-left: 50px;
    cursor: pointer;
  }
</style>
